import { ListPage, SearchInput } from "custom/index";
import { getVideoManagePage } from './api'
import { addDialog } from './dialog'
import VideosList from './components/VideosList.vue'
import SearchTitle from './components/SearchTitle.vue'

const input = new SearchInput('SearchInput')
input.setComponent(SearchTitle)
const page = new ListPage('TrainingVideos');
page
  .api(getVideoManagePage)
  .useSearch()
    .addChild(input, 'input')
    .upto('ListPage')
  .useTable()
    .setComponent(VideosList)
    .end()
  .usePagination()
    .end() 
  .useAuthButton()
    .useItem('add').primary().content('添加新视频').addRow(addDialog).end()
    .end()

export default page
